//#include "stdafx.h"
#include "CBASE.h"
CBASE gbase;

CBASE::CBASE()
{
	Load();
}

CBASE::~CBASE()
{
	Unload();
}

bool CBASE::Load()
{
	m_hDll = (void *)LoadLibrary(L"BCESDK.dll");
	if(!m_hDll)
	{
		//MessageBox(_T("DLL  ERROR"));
		return false;
	}

	BCESDK_Init = (P_BCESDK_Init)GetProcAddress((HMODULE)m_hDll,L"BCESDK_Init");
	if(BCESDK_Init == NULL)
	{
		//MessageBox(_T("BCESDK_Init ERROR"));
		return false;
	}
	
	BCESDK_InitEx = (P_BCESDK_InitEx)GetProcAddress((HMODULE)m_hDll,L"BCESDK_InitEx");
	if(BCESDK_InitEx == NULL)
	{
		return false;
	}

    BCESDK_GetSofewareVersion = (P_BCESDK_GetSofewareVersion)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetSofewareVersion");
	if(BCESDK_GetSofewareVersion == NULL)
	{
		//MessageBox(_T("BCESDK_Init ERROR"));
		return false;
	}
	BCESDK_UnInit = (P_BCESDK_UnInit)GetProcAddress((HMODULE)m_hDll,L"BCESDK_UnInit");
	if(BCESDK_UnInit == NULL)
	{
		//MessageBox(_T("BCESDK_UnInit ERROR"));
		return false;
	}

	BCESDK_GetDefaultPinCode = (P_BCESDK_GetDefaultPinCode)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetDefaultPinCode");
	if(BCESDK_GetDefaultPinCode == NULL)
	{
		//MessageBox(_T("BCESDK_GetDefaultPinCode ERROR"));
		return false;
	}

	BCESDK_SetDefaultPinCode = (P_BCESDK_SetDefaultPinCode)GetProcAddress((HMODULE)m_hDll,L"BCESDK_SetDefaultPinCode");
	if(BCESDK_GetDefaultPinCode == NULL)
	{
		//MessageBox(_T("BCESDK_SetDefaultPinCode ERROR"));
		return false;
	}

	BCESDK_GetLocalName = (P_BCESDK_GetLocalName)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetLocalName");
	if(BCESDK_GetLocalName == NULL)
	{
		//MessageBox(_T("BCESDK_GetLocalName ERROR"));
		return false;
	}

	BCESDK_SetLocalName = (P_BCESDK_SetLocalName)GetProcAddress((HMODULE)m_hDll,L"BCESDK_SetLocalName");
	if(BCESDK_GetLocalName == NULL)
	{
		//MessageBox(_T("BCESDK_GetLocalName ERROR"));
		return false;
	}

	BCESDK_GetLocalBTAddr = (P_BCESDK_GetLocalBTAddr)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetLocalBTAddr");
	if(BCESDK_GetLocalBTAddr == NULL)
	{
		//MessageBox(_T("BCESDK_SetDefaultPinCode ERROR"));
		return false;
	}

	BCESDK_GetModuleString = (P_BCESDK_GetModuleString)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetModuleString");
	if(BCESDK_GetModuleString == NULL)
	{
		//MessageBox(_T("BCESDK_GetModuleString ERROR"));
		return false;
	}

	BCESDK_DeviceDiscovery = (P_BCESDK_DeviceDiscovery)GetProcAddress((HMODULE)m_hDll,L"BCESDK_DeviceDiscovery");
	if(BCESDK_DeviceDiscovery == NULL)
	{
		//MessageBox(_T("BCESDK_GetLocalName ERROR"));
		return false;
	}

	BCESDK_StopDiscovery = (P_BCESDK_StopDiscovery)GetProcAddress((HMODULE)m_hDll,L"BCESDK_StopDiscovery");
	if(BCESDK_StopDiscovery == NULL)
	{
		//MessageBox(_T("BCESDK_StopDiscovery ERROR"));
		return false;
	}
	BCESDK_SetPairable = (P_BCESDK_SetPairable)GetProcAddress((HMODULE)m_hDll,L"BCESDK_SetPairable");
	if(BCESDK_SetPairable == NULL)
	{
		//MessageBox(_T("BCESDK_GetLocalName ERROR"));
		return false;
	}

	BCESDK_PairDevice = (P_BCESDK_PairDevice)GetProcAddress((HMODULE)m_hDll,L"BCESDK_PairDevice");
	if(BCESDK_PairDevice == NULL)
	{
		//MessageBox(_T("BCESDK_GetLocalName ERROR"));
		return false;
	}

	BCESDK_IsPairDevice = (P_BCESDK_IsPairDevice)GetProcAddress((HMODULE)m_hDll,L"BCESDK_IsPairDevice");
	if(BCESDK_IsPairDevice == NULL)
	{
		//MessageBox(_T("BCESDK_GetLocalName ERROR"));
		return false;
	}

	BCESDK_UnPairDevice = (P_BCESDK_UnPairDevice)GetProcAddress((HMODULE)m_hDll,L"BCESDK_UnPairDevice");
	if(BCESDK_PairDevice == NULL)
	{
		//MessageBox(_T("BCESDK_GetLocalName ERROR"));
		return false;
	}
    
	BCESDK_GetRemoteName = (P_BCESDK_GetRemoteName)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetRemoteName");
	if(BCESDK_GetRemoteName == NULL)
	{
		//MessageBox(_T("BCESDK_GetRemoteServices ERROR"));
		return false;
	}

	BCESDK_GetRemoteServices = (P_BCESDK_GetRemoteServices)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetRemoteServices");
	if(BCESDK_GetRemoteServices == NULL)
	{
		//MessageBox(_T("BCESDK_GetRemoteServices ERROR"));
		return false;
	}
	
	BCESDK_Connect = (P_BCESDK_Connect)GetProcAddress((HMODULE)m_hDll,L"BCESDK_Connect");
	if(BCESDK_Connect == NULL)
	{
		//MessageBox(_T("BCESDK_Connect ERROR"));
		return false;
	}

	BCESDK_ConnectEx = (P_BCESDK_ConnectEx)GetProcAddress((HMODULE)m_hDll,L"BCESDK_ConnectEx");
	if(BCESDK_ConnectEx == NULL)
	{
		//MessageBox(_T("BCESDK_ConnectEx ERROR"));
		return false;
	}

	BCESDK_Disconnect = (P_BCESDK_Disconnect)GetProcAddress((HMODULE)m_hDll,L"BCESDK_Disconnect");
	if(BCESDK_Disconnect == NULL)
	{
		//MessageBox(_T("BCESDK_Connect ERROR"));
		return false;
	}

	BCESDK_IsConnected = (P_BCESDK_IsConnected)GetProcAddress((HMODULE)m_hDll,L"BCESDK_IsConnected");
	if(BCESDK_IsConnected == NULL)
	{
		//MessageBox(_T("BCESDK_Connect ERROR"));
		return false;
	}

 	BCESDK_GetAllShortCuts = (P_BCESDK_GetAllShortCuts)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetAllShortCuts");
 	if(BCESDK_GetAllShortCuts == NULL)
 	{
 		//MessageBox(_T("BCESDK_Connect ERROR"));
 		return false;
 	}

 	BCESDK_DeleteShortCut = (P_BCESDK_DeleteShortCut)GetProcAddress((HMODULE)m_hDll,L"BCESDK_DeleteShortCut");
 	if(BCESDK_DeleteShortCut == NULL)
 	{
 		//MessageBox(_T("BCESDK_Connect ERROR"));
 		return false;
 	}

	BCESDK_EnableAutoConnectHF = (P_BCESDK_EnableAutoConnectHF)GetProcAddress((HMODULE)m_hDll,L"BCESDK_EnableAutoConnectHF");
	if(BCESDK_EnableAutoConnectHF == NULL)
	{
		return false;
	}

	BCESDK_DisableAutoConnectHF = (P_BCESDK_DisableAutoConnectHF)GetProcAddress((HMODULE)m_hDll,L"BCESDK_DisableAutoConnectHF");
	if(BCESDK_DisableAutoConnectHF == NULL)
	{
		return false;
	}

	BCESDK_IsAutoConnectHF = (P_BCESDK_IsAutoConnectHF)GetProcAddress((HMODULE)m_hDll,L"BCESDK_IsAutoConnectHF");
	if(BCESDK_IsAutoConnectHF == NULL)
	{
		return false;
	}

	BCESDK_RegisterConnectCallback = (P_BCESDK_RegisterConnectCallback)GetProcAddress((HMODULE)m_hDll,L"BCESDK_RegisterConnectCallback");
	if(BCESDK_RegisterConnectCallback == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterConnectCallback ERROR"));
		return false;
	}

	BCESDK_RegisterPairCallback = (P_BCESDK_RegisterPairCallback)GetProcAddress((HMODULE)m_hDll,L"BCESDK_RegisterPairCallback");
	if(BCESDK_RegisterPairCallback == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}
     
	BCESDK_HFAP_RegisterCallback = (P_BCESDK_HFAP_RegisterCallback)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_RegisterCallback");
	if(BCESDK_HFAP_RegisterCallback == NULL)
	{
		//MessageBox(_T("BCESDK_HFAP_RegisterCallbackWnd ERROR"));
		return false;
	}

	BCESDK_HFAP_AnswerCall = (P_BCESDK_HFAP_AnswerCall)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_AnswerCall");
	if(BCESDK_HFAP_AnswerCall == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_HFAP_CancelCall = (P_BCESDK_HFAP_CancelCall)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_CancelCall");
	if(BCESDK_HFAP_CancelCall == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_HFAP_Dial = (P_BCESDK_HFAP_Dial)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_Dial");
	if(BCESDK_HFAP_Dial == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_HFAP_LastNumRedial = (P_BCESDK_HFAP_LastNumRedial)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_LastNumRedial");
	if(BCESDK_HFAP_LastNumRedial == NULL)
	{
		//MessageBox(_T("BCESDK_HFAP_LastNumRedial ERROR"));
		return false;
	}
	
	BCESDK_HFAP_TransmitDTMFCode = (P_BCESDK_HFAP_TransmitDTMFCode)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_TransmitDTMFCode");
	if(BCESDK_HFAP_TransmitDTMFCode == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}
	BCESDK_HFAP_GetAudioStatus = (P_BCESDK_HFAP_GetAudioStatus)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_GetAudioStatus");
	if(BCESDK_HFAP_GetAudioStatus == NULL)
	{
        return false;
	}

	BCESDK_HFAP_Transfer = (P_BCESDK_HFAP_Transfer)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_Transfer");
	if (BCESDK_HFAP_Transfer == NULL)
	{
		//MessageBox(_T("BCESDK_HFAP_Transfer ERROR"));
		return false;
	}
	BCESDK_HFAP_TransferBack = (P_BCESDK_HFAP_TransferBack)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_TransferBack");
	if(BCESDK_HFAP_TransferBack == NULL)
	{
		return false;
	}

	BCESDK_HFAP_MuteMic = (P_BCESDK_HFAP_MuteMic)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_MuteMic");
	if(BCESDK_HFAP_MuteMic == NULL)
	{
		return false;
	}

	BCESDK_HFAP_UnmuteMic = (P_BCESDK_HFAP_UnmuteMic)GetProcAddress((HMODULE)m_hDll,L"BCESDK_HFAP_UnmuteMic");
	if(BCESDK_HFAP_UnmuteMic == NULL)
	{
		return false;
	}

	BCESDK_EnableAutoAnswer = (P_BCESDK_EnableAutoAnswer)GetProcAddress((HMODULE)m_hDll,L"BCESDK_EnableAutoAnswer");
	if(BCESDK_EnableAutoAnswer == NULL)
	{
		return false;
	}

	BCESDK_DisableAutoAnswer = (P_BCESDK_DisableAutoAnswer)GetProcAddress((HMODULE)m_hDll,L"BCESDK_DisableAutoAnswer");
	if(BCESDK_DisableAutoAnswer == NULL)
	{
		return false;
	}

	BCESDK_IsAutoAnswer = (P_BCESDK_IsAutoAnswer)GetProcAddress((HMODULE)m_hDll,L"BCESDK_IsAutoAnswer");
	if(BCESDK_IsAutoAnswer == NULL)
	{
		return false;
	}

	BCESDK_BindA2DPToHF = (P_BCESDK_BindA2DPToHF)GetProcAddress((HMODULE)m_hDll,L"BCESDK_BindA2DPToHF");
	if(BCESDK_BindA2DPToHF == NULL)
	{
		return false;
	}

	BCESDK_UnbindA2DPFromHF = (P_BCESDK_UnbindA2DPFromHF)GetProcAddress((HMODULE)m_hDll,L"BCESDK_UnbindA2DPFromHF");
	if(BCESDK_UnbindA2DPFromHF == NULL)
	{
		return false;
	}

	BCESDK_PIMStartUpdateContacts = (P_BCESDK_PIMStartUpdateContacts)GetProcAddress((HMODULE)m_hDll,L"BCESDK_PIMStartUpdateContacts");
	if(BCESDK_PIMStartUpdateContacts == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_PIMRegisterCallback = (P_BCESDK_PIMRegisterCallback)GetProcAddress((HMODULE)m_hDll,L"BCESDK_PIMRegisterCallback");
	if(BCESDK_PIMRegisterCallback == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_PIMStartUpdateCalllog = (P_BCESDK_PIMStartUpdateCalllog)GetProcAddress((HMODULE)m_hDll,L"BCESDK_PIMStartUpdateCalllog");
	if(BCESDK_PIMStartUpdateCalllog == NULL)
	{
		//MessageBox(_T("BCESDK_PIMStartUpdateCalllog ERROR"));
		return false;
	}

	BCESDK_PIMGetContacts = (P_BCESDK_PIMGetContacts)GetProcAddress((HMODULE)m_hDll,L"BCESDK_PIMGetContacts");
	if(BCESDK_PIMGetContacts == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_PIMGetCalllogs = (P_BCESDK_PIMGetCalllogs)GetProcAddress((HMODULE)m_hDll,L"BCESDK_PIMGetCalllogs");
	if (BCESDK_PIMGetCalllogs == NULL)
	{
		return false;
	}

	BCESDK_GetPhoneList = (P_BCESDK_GetPhoneList)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetPhoneList");
	if(BCESDK_GetPhoneList == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_AVRCPPlay = (P_BCESDK_AVRCPPlay)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPPlay");
	if(BCESDK_AVRCPPlay == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}


	BCESDK_AVRCPPause = (P_BCESDK_AVRCPPause)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPPause");
	if(BCESDK_AVRCPPause == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_AVRCPStop = (P_BCESDK_AVRCPStop)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPStop");
	if(BCESDK_AVRCPStop == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_AVRCPPlayLast = (P_BCESDK_AVRCPPlayLast)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPPlayLast");
	if(BCESDK_AVRCPPlayLast == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_AVRCPPlayNext = (P_BCESDK_AVRCPPlayNext)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPPlayNext");
	if(BCESDK_AVRCPPlayNext == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_AVRCPVolumeUP = (P_BCESDK_AVRCPVolumeUP)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPVolumeUP");
	if(BCESDK_AVRCPVolumeUP == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_AVRCPVolumeDown = (P_BCESDK_AVRCPVolumeDown)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPVolumeDown");
	if(BCESDK_AVRCPVolumeDown == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_EnalbeA2DP = (P_BCESDK_EnalbeA2DP)GetProcAddress((HMODULE)m_hDll,L"BCESDK_EnalbeA2DP");
	if(BCESDK_EnalbeA2DP == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_DisableA2DP = (P_BCESDK_DisableA2DP)GetProcAddress((HMODULE)m_hDll,L"BCESDK_DisableA2DP");
	if(BCESDK_DisableA2DP == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_IsA2DPEnable = (P_BCESDK_IsA2DPEnable)GetProcAddress((HMODULE)m_hDll,L"BCESDK_IsA2DPEnable");
	if(BCESDK_IsA2DPEnable == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_A2DP_SNK_EnablePlay = (P_BCESDK_A2DP_SNK_EnablePlay)GetProcAddress((HMODULE)m_hDll,L"BCESDK_A2DP_SNK_EnablePlay");
	if(BCESDK_A2DP_SNK_EnablePlay == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_A2DP_SNK_DisablePlay = (P_BCESDK_A2DP_SNK_DisablePlay)GetProcAddress((HMODULE)m_hDll,L"BCESDK_A2DP_SNK_DisablePlay");
	if(BCESDK_A2DP_SNK_DisablePlay == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_RegPassThrCmdCbk = (P_BCESDK_RegPassThrCmdCbk)GetProcAddress((HMODULE)m_hDll,L"BCESDK_RegPassThrCmdCbk");
	if(BCESDK_RegPassThrCmdCbk == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_DUNGetCountry = (P_BCESDK_DUNGetCountry)GetProcAddress((HMODULE)m_hDll,L"BCESDK_DUNGetCountry");
	if(BCESDK_DUNGetCountry == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_DUNGetProvider = (P_BCESDK_DUNGetProvider)GetProcAddress((HMODULE)m_hDll,L"BCESDK_DUNGetProvider");
	if(BCESDK_DUNGetProvider == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_GetClientPort = (P_BCESDK_GetClientPort)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetClientPort");
	if(BCESDK_GetClientPort == NULL)
	{
		//MessageBox(_T("BCESDK_GetClientPort ERROR"));
		return false;
	}

	BCESDK_FTPGetRemoteFileList = (P_BCESDK_FTPGetRemoteFileList)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPGetRemoteFileList");
	if(BCESDK_FTPGetRemoteFileList == NULL)
	{
		//MessageBox(_T("BCESDK_FTPGetRemoteFileList ERROR"));
		return false;
	}

	BCESDK_FTPDownLoadFile = (P_BCESDK_FTPDownLoadFile)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPDownLoadFile");
	if(BCESDK_FTPDownLoadFile == NULL)
	{
		//MessageBox(_T("BCESDK_FTPDownLoadFile ERROR"));
		return false;
	}
	BCESDK_FTPDownLoadDir = (P_BCESDK_FTPDownLoadDir)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPDownLoadDir");
	if(BCESDK_FTPDownLoadDir == NULL)
	{
		//MessageBox(_T("BCESDK_FTPDownLoadFile ERROR"));
		return false;
	}
	BCESDK_FTPNewFolder = (P_BCESDK_FTPNewFolder)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPNewFolder");
	if(BCESDK_FTPNewFolder == NULL)
	{
		//MessageBox(_T("BCESDK_FTPNewFolder ERROR"));
		return false;
	}
	BCESDK_FTPSetRmtDir = (P_BCESDK_FTPSetRmtDir)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPSetRmtDir");
	if(BCESDK_FTPSetRmtDir == NULL)
	{
		//MessageBox(_T("BCESDK_FTPSetRmtDir ERROR"));
		return false;
	}
	BCESDK_FTPGetRmtDir = (P_BCESDK_FTPGetRmtDir)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPGetRmtDir");
	if(BCESDK_FTPGetRmtDir == NULL)
	{
		//MessageBox(_T("BCESDK_FTPGetRmtDir ERROR"));
		return false;
	}
	BCESDK_FTPPutFile = (P_BCESDK_FTPPutFile)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPPutFile");
	if(BCESDK_FTPPutFile == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}

	BCESDK_FTPPutDir = (P_BCESDK_FTPPutDir)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPPutDir");
	if(BCESDK_FTPPutDir == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}
	BCESDK_FTPDeleteFile = (P_BCESDK_FTPDeleteFile)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPDeleteFile");
	if(BCESDK_FTPDeleteFile == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}
	BCESDK_FTPDeleteDir = (P_BCESDK_FTPDeleteDir)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPDeleteDir");
	if(BCESDK_FTPDeleteDir == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}
	BCESDK_FTPCancelTransfer = (P_BCESDK_FTPCancelTransfer)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPCancelTransfer");
	if(BCESDK_FTPCancelTransfer == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}
	BCESDK_FTPRegisterStatusCallback = (P_BCESDK_FTPRegisterStatusCallback)GetProcAddress((HMODULE)m_hDll,L"BCESDK_FTPRegisterStatusCallback");
	if(BCESDK_FTPRegisterStatusCallback == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}
	BCESDK_SetDefaultPath = (P_BCESDK_SetDefaultPath)GetProcAddress((HMODULE)m_hDll,L"BCESDK_SetDefaultPath");
	if(BCESDK_SetDefaultPath == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}
	BCESDK_GetDefaultPath = (P_BCESDK_GetDefaultPath)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetDefaultPath");
	if(BCESDK_GetDefaultPath == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}

	BCESDK_GetSavePath = (P_BCESDK_GetSavePath)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetSavePath");
	if(BCESDK_GetSavePath == NULL)
	{
		//MessageBox(_T("BCESDK_FTPPutFile"));
		return false;
	}

	BCESDK_GetLastConnectedHFDevice = (P_BCESDK_GetLastConnectedHFDevice)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetLastConnectedHFDevice");
	if(BCESDK_GetLastConnectedHFDevice == NULL)
	{
		return false;
	}

	BCESDK_GetLastConnectedAVDevice = (P_BCESDK_GetLastConnectedAVDevice)GetProcAddress((HMODULE)m_hDll,L"BCESDK_GetLastConnectedAVDevice");
	if(BCESDK_GetLastConnectedAVDevice == NULL)
	{
		return false;
	}

	BCESDK_PIMGetOppContacts = (P_BCESDK_PIMGetOppContacts)GetProcAddress((HMODULE)m_hDll,L"BCESDK_PIMGetOppContacts");
	if(BCESDK_PIMGetOppContacts == NULL)
	{
		return false;
	}
	BCESDK_OPPPushContact = (P_BCESDK_OPPPushContact)GetProcAddress((HMODULE)m_hDll,L"BCESDK_OPPPushContact");
	if(BCESDK_OPPPushContact == NULL)
	{
		return false;
	}

	BCESDK_AVRCPForcePlay = (P_BCESDK_AVRCPForcePlay)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPForcePlay");
	if(BCESDK_AVRCPForcePlay == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	BCESDK_AVRCPForcePause = (P_BCESDK_AVRCPForcePause)GetProcAddress((HMODULE)m_hDll,L"BCESDK_AVRCPForcePause");
	if(BCESDK_AVRCPForcePause == NULL)
	{
		//MessageBox(_T("BCESDK_RegisterPairCallback ERROR"));
		return false;
	}

	return  true;
} 

void CBASE::Unload()
{
	FreeLibrary((HMODULE)m_hDll);
}